package repositories;

import java.util.Collection;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import domain.Registration;

@Repository
public interface RegistrationRepository extends JpaRepository<Registration, Integer>{

	//Obtener todos los registros de un participante concreto
	@Query("select p.registrations from Participant p where p.id=?1")
	Collection<Registration> findAllByParticipant(int id);
	
}
